import 'dart:async';

import 'package:jtsell_app/entity/mall_goods_entity.dart';

class StreamProvideModel {
  StreamController<List<MallGoodsEntity>> _streamCtrl;

  StreamController<List<MallGoodsEntity>> get streamCtrl => _streamCtrl;

  StreamSink<List<MallGoodsEntity>> get sink => _streamCtrl.sink;

  Stream<List<MallGoodsEntity>> get stream => _streamCtrl.stream;

  StreamProvideModel() {
    _streamCtrl = StreamController<List<MallGoodsEntity>>();
  }

  void dispose() {
    streamCtrl.close();
  }
}

final StreamProvideModel streamProvideModel = StreamProvideModel();
